# specify sample size
N = 1250
T = 25
K = 8

#-------------------------------------------------------------
# load data
#-------------------------------------------------------------
dataDir = "$(pwd())/data/Para1/"


agg_data    = readdlm(dataDir * "aggvar_sim.csv", ',', Float64, '\n'; skipstart=0);
densdraws   = readdlm(dataDir * "a_cross_sim.csv", ',', Float64, '\n'; skipstart=0)';
employdraws = readdlm(dataDir * "empl_cross_sim.csv", ',', Float64, '\n'; skipstart=0)';
ss_K        = readdlm(dataDir * "ss_K.csv", ',', Float64, '\n'; skipstart=0);
K_exact     = agg_data[:,2] .+ ss_K;

# subsequently use the same knots regardless of sample size N,T
knots_all = quantile(densdraws[employdraws.==1]/mean(K_exact), quant_vec)
K_id      = findmin(abs.(vec(K.-K_vec)))[2]
knots     = knots_all[quant_sel[K_id,:].==1]

# aggregate data
n_agg    = 2
